package com.ct.dao.utils;

import com.ct.dao.common.ObjectProvider;

/**
 * Created by IntelliJ IDEA.
 * User: nmkravchenko
 * Date: 22.10.2009
 * Time: 18:10:27
 * To change this template use File | Settings | File Templates.
 */
public class HolderUtil {
    public static <E> E getRequired(ObjectProvider<E> aHolder) {
        E retVal = aHolder.get();
        if (retVal == null) {
            throw new IllegalStateException("Value required but was null.");
        }
        return retVal;
    }    
}
